package traverser;

import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		long startTime = System.currentTimeMillis();
		Scanner source = new Scanner(System.in);
		String startPage;
		String endPage;

		// prompt users to input the items they are interested in
		System.out.println("Please input a starting item");
		startPage = "http://en.wikipedia.org/wiki/"+source.nextLine(); 
		
		System.out.println("Please input an ending item");
		endPage = "http://en.wikipedia.org/wiki/"+source.nextLine();
		// prompt user to input the other traverses they want to compare against
		System.out.println("What type of traverser would you like to compare against?");
		System.out.println("Please input 1 for FakeTraverse1 and 2 for FakeTraverse2");
		int option = source.nextInt();		

		long startTime1 = System.currentTimeMillis();
		Traverser control1 = new BasicTraverser(startPage, endPage);


		// Take metrics
		control1.traverse();
		long endTime = System.currentTimeMillis();
		System.out.println("Time spent in BFS search = " +(endTime-startTime1)+"ms");

		// Do the same for the new type.  Maybe the user specifies what type of traverser it is
		switch(option){
		case 1:{	Traverser test = new FakeTraverser();
		int time2 = test.traverse();
		System.out.println("Time spent in FakeTraverse1 = "+time2+"ms");
		}
		case 2: {	Traverser test = new FakeTraverser();
		int time2 = test.traverse();
		System.out.println("Time spent in FakeTraverse2 = "+time2+"ms");
		}
		}

	}

}
